import request from '@/utils/request'

// 查询开门记录列表
export function listDoor(query) {
  return request({
    url: '/access/door/list',
    method: 'get',
    params: query
  })
}

// 查询开门记录详细
export function getDoor(openId) {
  return request({
    url: '/access/door/' + openId,
    method: 'get'
  })
}

// 新增开门记录
export function addDoor(data) {
  return request({
    url: '/access/door',
    method: 'post',
    data: data
  })
}

// 修改开门记录
export function updateDoor(data) {
  return request({
    url: '/access/door',
    method: 'put',
    data: data
  })
}

// 删除开门记录
export function delDoor(openId) {
  return request({
    url: '/access/door/' + openId,
    method: 'delete'
  })
}

// 导出开门记录
export function exportDoor(query) {
  return request({
    url: '/access/door/export',
    method: 'get',
    params: query
  })
}